<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<base href="${basePath}" /> 
<#include "/views/ftl/base/manager_include.ftl">
<script type="text/javascript" src="${basePath}js/My97DatePicker/WdatePicker.js"></script>
<head>
<style>
A{
color: #333;
}
.td_important{
    font-size: 18px;
    color: #F30000;
    font-weight: 800;
}

</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>交易管理</title>

</head>
<body style="background:#eef3f7;">
<#include "/views/ftl/base/head.ftl">
<div class="Main">
  <div class="dw">
<#include "/views/ftl/base/menu.ftl">
<#function a><#return "提现列表_List"></#function> 
<!--右边内容-->
<div class="Rightbox fl">
    <!--导航-->
    <div class="Bread_crbs clear">
      <div class="Bread_crbs_img fl"></div>
      <div class="Bread_crbs_text fl">
      	<a href="javascript:void(0);"><span>交易管理</span></a>
      	<span class="fnt_famy">></span>
      	<a href="javascript:void(0);"><span>交易详情</span></a>
      </div>
    </div>
        <div class="Table">	
          <#if ((changeCashOrder)??)>
           <table id="table" cellpadding="0" cellspacing="1">
            <tbody>
              <tr id="gl">
             <td>账号所属id</td>
             <td>姓名(或公司)</td>
            <#if changeCashOrder.shopCompanyType ==1><td>法人</td></#if>
             <td>支付宝账号</td>
             <td>开户网点 </td>
             <td>银行卡号</td> 
              </tr>
     		<tr>
            <td class="tdd6"> ${(changeCashOrder.userId?c)!''}</td>
			<td class="td_important">${(changeCashOrder.realName)!''}</td>
			<#if changeCashOrder.shopCompanyType ==1><td >${(changeCashOrder.legalPerson)!''}</td></#if>
			<td class="td_important">${(changeCashOrder.aliPayAccount)!''}</td>
			<td>${(changeCashOrder.openAccountLocation)!''}</td>
			<td>${(changeCashOrder.accountNo)!''}</td> 
			  
			 </tr>
            </tbody>
          </table>
          </#if>
          
          
          
        <!--表格列表-->
        
   
          <table id="table" cellpadding="0" cellspacing="1">
            <tbody>
              <tr id="gl">
               <td>付款方</td>
             <td>交易订单号</td>
            
             <td>收款方</td> 
             <td>交易分类 </td>
             <td>订单简单描述</td>
             <td>订单详细描述</td>
              </tr>
             
     		<tr>
     		<td class="tdd6">${(transInfo.payUserId?c)}</td>
			<td>${(transInfo.tranOrderId)!''}</td>
			
			<td class="tdd6">${(transInfo.gainUserId?c)}</td> 
			<td>
			
			<#list tranTypeEnum as enum >  
				<#if (transInfo.tranType==enum.tranType)>${enum.description}</#if> 
			</#list>  

</td>       <td>${(transInfo.tranSimpleDesc)!''}</td>
          	<td>${(transInfo.tranDesc)!''}</td>
           
            
            </tbody>
          </table>
                  <!--表格列表-->
          <table id="table" cellpadding="0" cellspacing="1">
            <tbody>
              <tr id="gl">
             <td >总金额</td>
             <td>付款人说的话</td>
             <td >实收金额</td>
             <td>手续费 </td>
             <td>手续费率 </td>
             <td>支付接口</td>
             <td>操作类型</td>
            
              </tr>
            
     		<tr>
            <td class="tbl_btn"> ${(transInfo.totalMoney)?c}</td>
			<td>${(transInfo.paySayText)!''}</td>
			<td class="td_important">${(transInfo.realMoney)?c}</td>
			<td>${(transInfo.feeMoney)?c}</td>
			<td>${(transInfo.feeRates*100)!''}%</td>
			<td>
			<#list tranPayInterfaceEnum as enum >  
				<#if (transInfo.interfaceType==enum.payType)>${enum.description}</#if> 
			</#list>    
			</td>
			<td>
			<#if (transInfo.operatingType==1)>系统操作</#if>
			<#if (transInfo.operatingType==2)>管理员操作</#if>
			<#if (transInfo.operatingType==3)>用户操作</#if>
			</td>     
            </tbody>
          </table>
              
          <table id="table" cellpadding="0" cellspacing="1">
            <tbody>
              <tr id="gl">
             <td>管理员</td>
             <td>用户</td>
             <td>Ip</td>
             <td>交易状态</td>
             <td>创建时间</td>
             <td>付款时间</td>
              <td>处理时间</td>
             <td>处理情况</td>
              </tr>
            
     		<tr>
         
			<td>${(transInfo.operatingManagerId?c)!''}</td>
			<td>${(transInfo.operatingUserId?c)!''}</td>
			<td>${(transInfo.operatingIp)!''}</td>
                         
             
             <td>
            <#list tranStatusEnum as enum >  
				<#if (transInfo.statusType==enum.statusType)>${enum.statusDesc}</#if> 
			</#list>   
             </td>
             <td>${(transInfo.createTime)!''}</td>
             <td>${(transInfo.payTime)!''}</td>
             <td>${(transInfo.handleTime)!''}</td>
             <td>${(transInfo.handleDesc)!''}</td>
          
              </tr>                   
            </tbody>
          </table>
       
       
       <table id="table" cellpadding="0" cellspacing="1">
            <tbody>
              <tr id="gl"> 
             <#if (transInfo.tranType==3&&transInfo.statusType==30)>
              <td>备注</td>
              <td>备注</td>
             <td>操作</td>
             </#if>  
              </tr>
            
     		<tr>
         

           <#if canHandleChangeCash==true>  
           
           <td style="width:621px;"><textarea name="handleDesc"  id="bz" cols="20" rows="3" style="width: 621px; height: 61px;"> </textarea></td> 
           <td>
           <div class="input_name">
			<span>处理图:</span>
    		    <input name="handleImage" id="handleImage" value="<#if changeCashOrder.handleImage??><#if changeCashOrder.handleImage!=''>${(changeCashOrder.handleImage)!''}</#if></#if>" type="hidden">
        			<div id="divStatus" style="display:none;"></div>  
				<span id="spanButtonPlaceHolder"></span>
				<input id="btnCancel" type="button" value="Cancel All Uploads" onclick="swfu.cancelQueue();" style="display:none;margin-left: 2px; font-size: 8pt; height: 29px;" />
			     <!-- 图片上传 --> 
    		 <span>（请上传一张处理图）</span> 
    		 <strong class="Bstyle AiYa" style="width: 115px;"></strong><a href="javascript:void(0);">
    		 <img id="image_handleImage" src="<#if changeCashOrder.handleImage??><#if changeCashOrder.handleImage!=''>${(changeCashOrder.handleImage)!''}<#else>images/manager/up.jpg</#if><#else>images/manager/up.jpg</#if>" height="98" width="138"></a>
    		 </div>
    		 <br><br>
           </td>
              <td class="tbl_btn">
               <a href="javascript:handle('5');"><span id="editor">通过</span></a>
               <a href="javascript:handle('6');"><span id="save">交易失败</span></a>
               <a href="javascript:handle('7');"><span id="save">退款</span></a>
              </td>
              </#if>
              
              <#if canReHandleChangeCash==true> 
            <td style="width:621px;"> <textarea name="handleDesc"  id="bz" cols="20" rows="3" style="width: 621px; height: 61px;"></textarea>
             </td> 
              <td class="tbl_btn">
               <a href="javascript:reHandle();"><span id="editor">重新处理</span></a>  
               </td>
              </#if>
              
              </tr>                   
            </tbody>
          </table>
 
      </div>
</div>
</div>
<script type="text/javascript" src="js/swfupload/swfupload.js"></script>
<script type="text/javascript" src="js/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="js/swfupload/fileprogress.js"></script>
<script type="text/javascript" src="js/swfupload/handlers.js"></script> 
<script type="text/javascript" src="js/swfupload/MySwfUpLoad.js"></script> 
<script type="text/javascript">
MySwfUpLoad("spanButtonPlaceHolder","btnCancel","image_handleImage","handleImage");  

function handle(changeCashStatus){ 
	var handleImage;
	if(changeCashStatus != 5){
		if( $("#bz").val()==null||""==$("#bz").val()){
			alert("请填写处理情况!");
			return false;
		}
	}else{
		handleImage=$('#handleImage').val();
	}
	
	$.ajax({
		url : "manager/ChangeCash_handleByChangeCash",
		data : { 
			transactionInfoId:'${(transInfo.id)?c}',
			changeCashStatus : changeCashStatus,
			handleDesc:$("#bz").val(),
			handleImage : handleImage,
			operatingManagerId:'${(login_manager_Id)?c}'
		}, 
		dataType :"JSON",
		cache : false, 
		type : "POST",
		success : function(dat){
			alert(dat.msg);
			 location.reload();	
		}
	}); 
}

function reHandle(){  
	$.ajax({ 
		url : "manager/ChangeCash_reHandleByChangeCash",
		data : { 
			transactionInfoId:'${(transInfo.id)?c}',  
			operatingManagerId:'${(login_manager_Id)?c}'
		}, 
		dataType :"JSON",
		cache : false, 
		type : "POST",
		success : function(dat){
			alert(dat.msg);
			location.reload();	
		}
	}); 
}
</script>

</body>
</html>

